;(function(){
    let myChart = echarts.init(document.querySelector('div.box-left3'))

    let option = {
        tooltip: {
          trigger: "item",
        },
        legend: {
          textStyle: {
            color: "#666e8c",
          },
          orient: "vertical",
          top:20,
          right:5,
        },
        grid: {
          left: '3%',
          right: '4%',
          bottom: '3%',
          containLabel: true
        },
        series: [
          {
            type: "pie",
            radius: "50%",
            data: [
              { value: 1048, name: "图例1", label: { color: "#5470c6" } },
              { value: 735, name: "图例2", label: { color: "#91cc75" } },
              { value: 580, name: "图例3", label: { color: "#fac858" } },
              { value: 484, name: "图例4", label: { color: "#ff7070" } },
              { value: 300, name: "图例5", label: { color: "#73c0de" } },
            ],
            emphasis: {
              itemStyle: {
                shadowBlur: 10,
                shadowOffsetX: 0,
                shadowColor: "rgba(0, 0, 0, 1)",
              },
            },
          },
        ],
      };
    
    myChart.setOption(option)
    
    window.addEventListener('resize',() => {
        myChart.resize()
    })
})()